// import { lazy } from "react";
import { Navigate, createBrowserRouter } from "react-router-dom";
import Index from "@/pages/Index";
import Login from "@/pages/Login";
import Register from "@/pages/Login/Register";
import Home from "@/pages/Index/Home"
import Public from "@/pages/Index/Public";
import Info from "@/pages/Index/Info";
import Message from "@/pages/Index/Message/indexd";
import Favorites from "@/pages/Index/Info/Bottom/Favorites";
import Liked from "@/pages/Index/Info/Bottom/Liked";
import MarkDown from "@/pages/Index/Info/Bottom/MarkDown";
import UserDetail from "@/pages/Index/UserDetail";
import SearchList from "@/pages/Index/SearchList";
import ManageHome from "@/pages/ManageMent/Home";
import ManageLogin from "@/pages/ManageMent/Login";
const router = createBrowserRouter([
    {
        path:'/',
        element:<Index/>,
        children:[
            {
                path:'/explor',
                element:<Home/>,
            },
            {
                path:'public',
                element:<Public/>,
            },
            {
                path:'message',
                element:<Message/>,
            },
            {
                path:'userDetail',
                element:<UserDetail/>,
            },
            {
                path:'searchList',
                element:<SearchList/>,
            },
            {
                path:"information",
                element: <Info />,
                children: [
                    {
                        path: '/information',
                        element:<Navigate to="/information/markDown"/>
                    },
                    {
                        path:'markDown',
                        element:<MarkDown/>,
                    },
                    {
                        path:'liked',
                        element:<Liked/>,
                    },
                    {
                        path:'favorites',
                        element:<Favorites/>,
                    }
                ]
            }
        ]
    },
   
    {
        path:'/login',
        element:<Login/>
    },
    {
        path:'/register',
        element:<Register/>
    },
    {
        path:'/manageMent',
        element: <ManageHome />,
    },
    {
        path:'/manageLogin',
        element:<ManageLogin/>
    },
])
export default router